<template>
  <div>
      <van-sticky>
        <van-search class="sousuo" shape="round" placeholder="搜索你想要的宝贝" v-model="value" />
      </van-sticky>
      <div class="right">
        <router-view class="inright" />
      </div>
      <div class="left">
        <van-sidebar class="inleft" v-model="activeKey">
          <van-sidebar-item
           v-for="(item,index) in items"
           :title="item.text"
           :to='{name:item.to,query:{id:item.id}}'
           class="side"
          />
        </van-sidebar>
      </div>
  </div>
</template>
<script>
export default {
    name:'Classify',
    data() {
      return {
        value:'',
        onClickRight:'',
        active:1,
        activeKey: 0,
        items: [
            { text: '热门专区' ,to:'ClassifyMain',id:"热门专区"},
            { text: '潮流女装' ,to:'ClassifyFishon',id:"潮流女装"},
            { text: '精品鞋履' ,to:'ClassifyFishon',id:"精品鞋履"},
            { text: '时尚包袋' ,to:'ClassifyFishon',id:"时尚包袋"},
            { text: '百变配饰' ,to:'ClassifyFishon',id:"百变配饰"},
            { text: '美妆洗护' ,to:'ClassifyFishon',id:"美妆洗护"},
            { text: '孕妈用品' ,to:'ClassifyFishon',id:"孕妈用品"},
            { text: '童婴服装' ,to:'ClassifyFishon',id:"童婴服装"},
            { text: '婴儿喂养' ,to:'ClassifyFishon',id:"婴儿喂养"},
            { text: '婴儿洗护' ,to:'ClassifyFishon',id:"婴儿洗护"},
            { text: '玩具图书' ,to:'ClassifyFishon',id:"玩具图书"},
            { text: '家居用品' ,to:'ClassifyFishon',id:"家居用品"},
            { text: '家用电器' ,to:'ClassifyFishon',id:"家用电器"},
        ]
      }
    },
    mounted(){
      this.$emit('getMsg',{active:this.active})
    }
}
</script>
<style scoped>
  .left{
    position: absolute;
    left: 0;
    width: 85px;
    height: 100%;
    overflow: auto;
  }
  .right{
    position: absolute;
    right: 0;
    width: 240px;
    height: 100%;
    overflow: auto;
  }
  .inleft{
    position: absolute;
    left: 0;
    top: 0;
  }
  .inright{
    position: absolute;
    top: 0;
    right: 0;
  }
.sousuo{
    border-bottom: 1px solid #dddddd;
}

.img{
    width: 100px;
    height: 50px;
    /* border: 1px solid pink; */
    margin: 2px;
}
.remen{
    margin-top: 10px;
    margin-left: -125px;
}
.fenlei{
    width: 190px;
    margin: 10px;
    margin-right: 10px;
    display: flex;
    overflow: hidden;
    flex-wrap: wrap;
    margin-left: 15px;
}
.fenlei li{
    width: 60px;
    height: 100px;
    padding-left: 2px;
}
.imgs{
    width: 200px;
    height: 190px;
}

.tit{
    margin-left: -160px;
}
.van-sidebar-item--select {
    border-color:pink;
}
.side{
    height: 40px;
    width: 90px;
    padding-top: 12px;
    font-size: 14px;
    position: relative;
}
</style>
